package com.woniuxy.microseckillserver.service;

import com.github.pagehelper.PageInfo;
import com.woniuxy.microcommonserver.bean.seckill_lk.SeckillGoodsInfo;
import com.woniuxy.microcommonserver.bean.seckill_lk.SellRequest;
import com.woniuxy.microcommonserver.pageHelper.PageRequest;

/**
 * @Author: 刘康
 * @Date: 2021/1/22 9:30
 * @Description:
 */
public interface ISeckillService {

    /**
     * 新增秒杀商品
     * @param seckillGoodsInfo
     * @return 新增的id
     */
    void saveSeckillGoods (SeckillGoodsInfo seckillGoodsInfo);

    /**
     * 修改秒杀商品
     * @param seckillGoodsInfo
     */
    void updateSeckillGoods (SeckillGoodsInfo seckillGoodsInfo);

    /**
     * 删除秒杀商品
     * @param id
     */
    void deleteSeckillGoods (Long id);

    /**
     * 分页查询
     * @return
     */
    PageInfo<SeckillGoodsInfo> findAllLimit(PageRequest pageRequest);

    void order(SellRequest request);
}
